import { GET, POST } from '../../request';
import { Res } from '../../common';
import * as Types from './index.d';

/**
 * 用户授权手机号注册
 * @param params
 * @returns
 */
export const registerUser = (
  params: Types.IRegisterUserParams,
): Promise<Res<Types.IRegisterUserRes>> => {
  return GET('/api/user_login', { ...params });
};

/**
 * 获取用户信息
 */
export const getUserInfo = () => {
  return GET('/api/get_user_info');
};

/**
* 更新用户信息
* @param params
* @returns
*/
export const updateUserInfo = (params: Types.IUpdateUserInfo): Promise<Res<any>> => {
  return GET('/api/edit_user_info',{...params});
};
